package org.cangdu.elm.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import org.cangdu.elm.domain.Poi;
import org.cangdu.elm.query.PoiQuery;
import org.cangdu.elm.service.IPoiService;
import org.cangdu.elm.util.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: weiRong
 * @Date: 2021/08/25/19:12
 * @Description:
 */
@RestController
@RequestMapping("/pois")
public class PoisController {
    @Autowired
    private IPoiService poiService;


    @GetMapping()
    public Object pois(PoiQuery qo){
        return JsonResult.success(poiService.queryPage(qo));
    }
}
